export default [
  // 用户登录 注册
  {
    component: '../layouts/UserLayout',
    path: '/user',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
      { path: '/user/register', component: './User/Register' },
      { path: '/user/register-result', component: './User/RegisterResult' },
    ],
  },
  // app
  {
    component: '../layouts/CustomLayout',
    path: '/',
    Routes: ['src/pages/Authorized'],
    authority: ['admin', 'user'],
    routes: [
      { path: '/', redirect: '/translate/baidu' },
      // 多语言翻译开发工具
      {
        path: '/translate',
        name: 'translate',
        icon: 'weibiaoti556',
        routes: [
          { path: '/translate/baidu', name: 'baidu', icon: 'fanyi', component: './Translate/Baidu' },
        ],
      },
      // 个人帐号中心
      {
        name: 'account',
        icon: 'user',
        path: '/account',
        hideInMenu: true,
        routes: [
          // 个人中心
          {
            component: './Account/Center/Center',
            path: '/account/center',
            name: 'center',
            routes: [
              { path: '/account/center', redirect: '/account/center/articles' },
              { path: '/account/center/articles', component: './Account/Center/Articles' },
              { path: '/account/center/applications', component: './Account/Center/Applications' },
              { path: '/account/center/projects', component: './Account/Center/Projects' },
            ],
          },
          // 个人设置
          {
            component: './Account/Settings/Info',
            path: '/account/settings',
            name: 'settings',
            routes: [
              { path: '/account/settings', redirect: '/account/settings/base' },
              { path: '/account/settings/base', component: './Account/Settings/BaseView' },
              { path: '/account/settings/security', component: './Account/Settings/SecurityView' },
              { path: '/account/settings/binding', component: './Account/Settings/BindingView' },
              { path: '/account/settings/notification', component: './Account/Settings/NotificationView' },
            ],
          },
        ],
      },
      // 异常页面 - 403 404 500
      {
        path: '/exception',
        name: 'exception',
        icon: 'warning',
        hideInMenu: true,
        routes: [
          { path: '/exception/403', name: 'not-permission', component: './Exception/403' },
          { path: '/exception/404', name: 'not-find', component: './Exception/404' },
          { path: '/exception/500', name: 'server-error', component: './Exception/500' },
        ],
      },
      // 其他路由 - 404
      {
        component: './Exception/404',
      },
    ],
  },
];
